package service.impl;

import dao.AdminDao;
import dao.impl.AdminDaoImpl;
import entity.Admin;
import service.AdminService;

import java.sql.SQLException;
import java.util.List;

public class AdminServiceImpl implements AdminService {
    AdminDao adminDao = new AdminDaoImpl();

    @Override
    public int getTotalCount(Integer id, String name) throws SQLException, ClassNotFoundException {
        return adminDao.getTotalCount(id, name);
    }

    @Override
    public List<Admin> chaxun(Integer id, String name, int page, int pageSize) throws SQLException, ClassNotFoundException {
        return adminDao.chaxun(id, name, page, pageSize);
    }

    @Override
    public int tianjia(Admin admin) throws SQLException, ClassNotFoundException {
        return adminDao.tianjia(admin);
    }

    @Override
    public int xiugai(Admin admin) throws SQLException, ClassNotFoundException {
        return adminDao.xiugai(admin);
    }

    @Override
    public int shanchu(Integer id) throws SQLException, ClassNotFoundException {
        return adminDao.shanchu(id);
    }
}
